package net.wanglu.www.zzz.rule.tense;

import java.util.HashMap;

import net.wanglu.www.zzz.rule.Rule;
import net.wanglu.www.zzz.service.se.__SentenceElements;
import net.wanglu.www.zzz.service.se.nsubj._NSubjTuple;
import edu.stanford.nlp.trees.TreeGraphNode;

public abstract class _TenseRule extends Rule {

	private PresentTense presentTense = new PresentTense();
	public static final int PresentTense = 1;
	@Override
	public Object applicable(Object... objects) throws Exception {
		// TODO Auto-generated method stub
		return Rule.Applicable;
	}

	@Override
	public Object deviseRightSolution(Object... objects) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object examine(Object... objects) throws Exception {
		// TODO Auto-generated method stub
		HashMap<?, ?> preprocessData = (HashMap<?, ?>) objects[0];
		__SentenceElements se = (__SentenceElements) objects[1];

		for( _NSubjTuple nst : se.NSubjTupleList) {
			TreeGraphNode verb = nst.getVerb();
			String verbTag = verb.label().tag();
			if ( "VB".equals(verbTag) || "VBP".equals(verbTag) || "VBZ".equals(verbTag)) {
				presentTense.examine(preprocessData, se, nst);
			}
		}
		return null;
	}

	@Override
	public Object whyItsWrong(Object... objects) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}
}
